package cn.yx.framework.exception;

import java.util.HashMap;

/**
 * @author ZHUL
 * @version V1.0
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2017-02-10 13:04
 */
public class SessionTimeoutException extends BasicException {
    private static final int CODE_SESSION_TIMEOUT_EXCEPTION = 5100;
    private String sessionId;

    public SessionTimeoutException(String sessionId) {
        this("未登录会话过期", sessionId);
    }

    public SessionTimeoutException(String message, String sessionId) {
        super(5100, message);
        this.sessionId = sessionId;
    }

    protected Object getData() {
        return new HashMap() {
            {
                this.put("sessionId", SessionTimeoutException.this.sessionId);
            }
        };
    }
}
